<?php
       $JGX=60; 
       $WY=61;
       $WS=60;
       $JS=60;
       $TY=50;
       $avg=($JS+$TY+$WS+$WY)/4;
         
/*if ($avg >= $JGX) {
    echo"<font color=geern>及格</font>";
}
else{
    echo"<font color=red>不及格</font>";
}
*/
?>
<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
       及格线=<?php echo $JGX;?><br/>
       网页效果图设计=<?php echo $WY;?><br/>
       网页设计=<?php echo $WS;?><br/>
       JS=<?php echo $JS;?><br/>
       体育=<?php echo $TY;?><br/>
       平均分=<?php echo $avg;?><br/>
       你的成绩:
       <?php if ($avg >= $JGX) {
                   echo "<font color=green>及格</font>";
              }
              else{
                   echo "<font color=red>不及格</font>"; 
              }
       ?>
       
       <?php if($avg >= $JGX): ?>
           <p>及格</p>
       <?php else: ?>
           <p>不及格</p>
       <?php endif; ?>
       
       <?php if($avg >= $JGX) { ?>
           <p>及格</p>
       <?php }else { ?>
           <p>不及格</p>
       <?php } ?>

</body>
</html>